package com.itheima.a02threadcase2;

public class MyRun implements Runnable {
    /**
     * 方法里面写逻辑
     */
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            //任何时候都可以创建一个县城内对象并且调用方法获得当前线程
            Thread thread = Thread.currentThread();

            System.out.println(thread.getName() + "Hello World ... ");
        }
    }
}
